<template>
  <div class="message-admin">
    <el-tabs v-model="activeName" class="demo-tabs">
      <el-tab-pane label="公告管理" name="公告管理">
        <NoticeAdmin :activeName="activeName"></NoticeAdmin>
      </el-tab-pane>
      <el-tab-pane
        v-if="userStore.UserInfo.identity === '超级管理员'"
        label="系统消息"
        name="系统消息"
      >
        <systemMessage :activeName="activeName"></systemMessage>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import NoticeAdmin from './components/NoticeAdmin.vue'
import systemMessage from './components/systemMessage.vue'
import { useUserStore } from '@/stores/user'
const userStore = useUserStore()

/** tabs数据 */
const activeName = ref<'公告管理' | '系统消息'>('公告管理')
</script>

<style scoped lang="scss">
.message-admin {
  padding: 0 8px;
}
</style>
